package mis.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import mis.domain.User;
import mis.repository.UserDao;

@Service("userManager")
public class SimpleUserManager implements UserManager {

    /**
	 * 
	 */
	private static final long serialVersionUID = 5984519423412264773L;
	private UserDao userDao;

	@Autowired
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
    
    public List<User> getUserList() {
        return userDao.getUserList();
    }

    public void addUser(User user)
    {
    	userDao.addUser(user);
    }
    
    public void updateUser(User user)
    {
    	userDao.updateUser(user);
    }

    public void deleteUser(int userId)
    {
    	userDao.deleteUser(userId);
    }
    
    public User getUser(int userId)
    {
    	return userDao.getUser(userId);
    }
}